<!--管理主页-->
<html>
<head>
    <meta charset="utf-8">
    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
    <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
    <title>管理主页</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!--<link rel="stylesheet" href="css/style.css">-->
    <script src="js/jquery-3.3.1.js"></script>
    <script src="js/bootstrap.min.js" ></script>
    <script src="js/jquery.cookie-1.4.1.min.js"></script>
    <script src="js/getParameter.js"></script>
    <script src="js/myCookie.js"></script>
    <style>
        body{
            margin: 0;
            padding: 0;
            overflow: visible;
            background-color: rgb(240,242,245);
        }
        #newsa{
            width:500px;
            height: 200px;
            position: fixed;
            left: 35%;
            top:30%;
        }
        #admin *{
            color: #333;
        }
        #middle{
            /*padding-top: 55px;*/
            /*background-color: red;*/
        }
    </style>

</head>
<body background="images/test-02.jpeg">
<!--<body>-->

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    温馨提示
                </h4>
            </div>
            <div class="modal-body">
                使用结束后请安全退出。
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">知道了
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<nav  style="position:fixed;z-index: 999;width: 100%;background-color: #fff" class="navbar navbar-default" role="navigation" >
    <div class="container-fluid">
        <div class="navbar-header" style="margin-left: 8%;margin-right: 1%">
            <a class="navbar-brand jump" name="test.html">图书管理系统</a>
        </div>
        <div class="collapse navbar-collapse" >
            <ul class="nav navbar-nav navbar-left">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        图书管理
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="jump" name="admin_books.html">全部图书</a></li>
                        <li class="divider"></li>
                        <li><a class="jump" name="admin_book_add.html">增加图书</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        读者管理
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="jump" name="admin_readers.html">全部读者</a></li>
                        <li class="divider"></li>
                        <li><a class="jump" name="admin_reader_add.html">增加读者</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        借还管理
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="jump" name="admin_lend_list.html">借还日志</a></li>
                    </ul>
                </li>
                <li >
                    <a class="jump" name="admin_repasswd.html">
                        密码修改
                    </a>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li id="admin">
                    <a class="quit"></a>
                </li>
                <li><a class="quit"><span class="glyphicon glyphicon-log-in"></span>&nbsp;退出</a></li>
            </ul>
        </div>
    </div>
</nav>
<div style="padding-top: 55px"></div>

<div id="middle"></div>

<!--<video style="width: 100%;height: 90%" autoplay="autoplay" loop="loop" muted="muted">-->
    <!--<source src="video/miku1314.mp4">-->
<!--</video>-->



</body>
<script>
    //加载session
    $(function () {
        admin_loads();
        $("#middle").load("test.html");
    });
    function admin_loads(){
        $.post("admin/getAdmin",function (data) {
            if (data.obj != null) {
                $("#admin a").removeClass("quit");
                $("#admin a").html("<span class=\"glyphicon glyphicon-user\"></span>&nbsp;"+data.obj+"，已登录");
            }else {
                $("#admin a").addClass("quit");
                $("#admin a").html("<span class=\"glyphicon glyphicon-user\"></span>&nbsp;请登录");
            }
            if(data.obj != null){
                $("#myModal").modal({
                    show: true
                });
            }
        },"json");
    }
    //清除session
    $(".quit").click(function () {
        $.get("admin/quitAdmin", function (data) {
            // location.href="index.html";
            history.back(-1);
        });
    });
</script>
<script src="js/integrationJS.js"></script>
</html>
